package Shangji2.calculator;

import Shangji2.calculator.Calculator;

public class DivideOperation implements Calculator {
    @Override
    public double calculate(double num1, double num2) {
        if (num2 == 0) {
            throw new ArithmeticException("除数不能为0");
        }
        return num1 / num2;
    }
}